<!DOCTYPE HTML>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>平台管理</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <link href="${ctxPath}/login/login.css" rel="stylesheet" type="text/css"/>

    <script type="text/javascript" src="${ctxPath}/res/jquery-easyui-1.5.3/jquery-1.11.0.min.js"></script>

    <script type="text/javascript" src="${ctxPath}/res/jquery-easyui-1.5.3/jquery.validate.min.js"></script>
    <script src="${ctxPath}/login/cloud.js" type="text/javascript"></script>
    <style>
        body{ background-color:#1c77ac; background-image:url(${ctxPath}/login/images/light.png); background-repeat:no-repeat; background-position:center top; overflow:hidden; }
        .systemlogo{background:url(${ctxPath}/login/images/pfloginlogo.png) no-repeat center;width:100%; height:71px; margin-top:75px;}
    </style>
    <script language="javascript">
        $(function(){
            $('.loginbox').css({'position':'absolute','left':($(window).width()-692)/2});
            $(window).resize(function(){
                $('.loginbox').css({'position':'absolute','left':($(window).width()-692)/2});
            })
            //生成验证码
            $('#kaptchaImage').click(function () {
                $(this).hide().attr('src', '/code/captcha-image?' + Math.floor(Math.random()*1000)).fadeIn();
            });
        });
    </script>
</head>

<body>
<div id="mainBody">
    <div id="cloud1" class="cloud"></div>
    <div id="cloud2" class="cloud"></div>
</div>


<div class="logintop">
    <span>欢迎登录后台管理</span>
</div>

<div class="loginbody">

    <span class="systemlogo"></span>

    <div class="loginbox loginbox3">
        <form action="${ctxPath}/login" method="post" id="loginForm">
            <input type="hidden" value="manage" name="manage"/>
            <input type="hidden" value="1" name="projectId"/>
            <ul>
                <li><input type="text" class="loginuser" name="username" id="username" value="admin"/></li>
                <li><input type="password" class="loginpwd" name="password" id="password" value="123456"/></li>
                <li class="yzm">
                    <span><input type="text" placeholder="验证码" id="captcha" name="captcha" /></span><cite>
                    <img src="${ctxPath}/code/captcha-image" id="kaptchaImage" style="width:114px;height: 46px"/></cite>
                </li>
                <li>
                    <input name="" type="submit" class="loginbtn" value="登录"/><label>
                    <input name="rememberMe" type="checkbox" value="true" checked="checked"/>下次自动登录</label></li>
                <li><span style="color:#f00;">${msg!''}</span></li>
            </ul>
        </form>


    </div>

</div>


<script>
    $("#loginForm").validate({
        rules: {
//            username: {required: true},
//            password: {required: true},
//            captcha: {required: true}
        },
        errorPlacement: function (error, element) {
        },
        submitHandler: function (form) {
            if($("#username").val() == ""){
                $("#username").focus();
                return false;
            }
            if($("#password").val() == ""){
                $("#password").focus();
                return false;
            }
            if($("#captcha").val() == ""){
                $("#captcha").focus();
                return false;
            }
            form.submit();
        }
    });

</script>
</body>
</html>
